package org.lanqiao.tjut.entity;

import java.util.ArrayList;
import java.util.List;

import org.lanqiao.tjut.service.GameService;
import org.lanqiao.tjut.service.GameServiceFactory;

public class GameSever {



	public void doPlayingGame() {
		// service对象
		GameService gs = GameServiceFactory.getGameServiceInstance();
		// 初始化游戏信息，并选择游戏
		List<Game> lstGames=gs.initGame();
		// 选择游戏
		Game game = gs.selGame(lstGames);
		// 初始化玩家队列
		List<Players> lstPlayers = new ArrayList<Players>();
		// 初始化玩家队列
		gs.initPlayers(lstPlayers);
		// 游戏等待
		gs.waitGame();
		// 开始游戏
		gs.playGame(lstPlayers, game);
	}
}
